package com.wanxi.doctor.mapper;


import com.wanxi.entity.Doctor;

import com.wanxi.entity.DoctorApply;
import com.wanxi.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface DoctorMapper {
    List<DoctorAddDTO> findAllFront(DoctorQuery doctorQuery);
    List<DoctorAddDTO> findAllFrontByProduct(DoctorQuery doctorQuery);
    List<DoctorAddDTO> findAllFrontByPaintent(DoctorQuery doctorQuery);
    List<DoctorAddDTO> findAllFrontByProductAndPaintent(DoctorQuery doctorQuery);
    List<DoctorAddDTO> findAllFrontByProductBack(DoctorQuery doctorQuery);
    List<DoctorAddDTO> findAllFrontByPaintentBack(DoctorQuery doctorQuery);
    List<DoctorAddDTO> findAllFrontByProductAndPaintentBack(DoctorQuery doctorQuery);
    List<DoctorFindBack> findAllBack(DoctorQuery doctorQuery);
    Integer add(@Param("doctorAddDTO") DoctorAddDTO doctorAddDTO);
    Integer addApply(DoctorApplyDTO doctorApplyDTO);

    Integer updateAuthentication(@Param("id")Long id, @Param("doctorAddDTO") DoctorAddDTO doctorAddDTO);
    Doctor findAccountStatus(@Param("id") Long id, @Param("state") Integer state);

    Integer delete(DoctorStatus doctorStatus);
    Integer updateStatus(DoctorStatus doctorStatus);
    Integer updateAccountStatus(DoctorAccountStatusDTO doctorAccountStatusDTO);
    List<DoctorApply> findAccountApply(DoctorApplyQuery doctorApplyQuery);
    DoctorApplyDTO findAccountApplyFront(DoctorApplyQuery doctorApplyQuery);

    Integer addAuthentication(DoctorAddDTO doctorAddDTO);

    Integer updateFailureReason(@Param("id")Long id,@Param("failureReason")String failureReason);

    Integer addDoctorServer(@Param("id")Long id,@Param("pId")Long pId);
}
